/*
 * Copyright (c) 2020-2099 the original author or authors. All rights reserve.
 */
package org.tianyun.cloud.security.server.spring;

import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.http.server.reactive.ServerHttpResponse;
import org.springframework.web.server.ServerWebExchange;
import org.tianyun.cloud.security.server.SecurityWebExchange;

/**
 * GatewaySecurityWebExchange
 *
 * @auther ebert_chan
 */
public interface GatewaySecurityWebExchange extends SecurityWebExchange<ServerHttpRequest, ServerHttpResponse> {

    /**
     * Returns a ServerWebExchange
     *
     * @return
     * @auther ebert_chan
     */
    ServerWebExchange delegate();

    /**
     * Returns a ServerHttpRequest
     *
     * @return
     * @auther ebert_chan
     */
    default ServerHttpRequest getRequest() {
        return delegate().getRequest();
    }

    /**
     * Returns a ServerHttpResponse
     *
     * @return
     * @auther ebert_chan
     */
    default ServerHttpResponse getResponse() {
        return delegate().getResponse();
    }

}
